-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump React to v16 alpha #445
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to merge this when the production
script is fixed
index.php
Outdated
@@ -35,8 +35,9 @@ function gutenberg_register_scripts() { | |||
$suffix = SCRIPT_DEBUG ? '' : '.min'; | |||
|
|||
// Vendor | |||
wp_register_script( 'react', 'https://unpkg.com/react@15/dist/react' . $suffix . '.js' ); | |||
wp_register_script( 'react-dom', 'https://unpkg.com/react-dom@15/dist/react-dom' . $suffix . '.js', array( 'react' ) ); | |||
$react_suffix = ( SCRIPT_DEBUG ? '.development' : '' ) . $suffix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we fallback to .production
to avoid errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we fallback to
.production
to avoid errors
Yes, added in e25e732.
There's now an unmet peer dependency from |
Maybe we could just drop this dependency for now (or replace it with our own implementation)? |
I bumped the |
This pull request seeks to update our React dependency to track the latest alpha version, currently
16.0.0.9-alpha.9
. Doing so will allow us to stay ahead of the curve in anticipation of upcoming changes. As the plugin becomes more widely distributed, we'll want to shift this back to a less unstable version, but I'd argue it's fine to opt in to an alpha dependency for our alpha plugin (we're also using the TinyMCE nightly version).There appear to be no breaking changes with this update, though it comes with a few additions we'll want to take advantage of. The "Fiber" reconciliation algorithm is the main headline for this release, but for our purposes, we're mostly interested in newly supported return values for components: strings and arrays. This will help, in #409 (comment) for example, in avoiding unnecessary wrapper elements in a
save
return value.